public class test2 {
    private static test2 test;
    private  test2(){

    }
    public synchronized  static test2 getInstance(){
        if(test==null){
            test=new test2();

        }
        return test;
    }
    public static void main(String[] args){
        test1 t1=test1.getInstance();
        test1 t2=test1.getInstance();
        System.out.println(t1==t2);
    }
}
